<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
  
  <head>
    
    <%@ include file="/WEB-INF/include/meta.jsp"%>
    <%@ include file="/WEB-INF/include/css.jsp"%>
    
  </head>
  <!-- end header -->
  <body>
    <div class="page-group">
      <div class="page page-current" style="background: #ffde00;">
        <div class="content" style="background: url(${ctx.resource}/image/taste/sign-bg.png) no-repeat; background-size: cover;" >
          <form class="registration-form">
            <div class="registration-wrap list-block no-margin">
              <div class="form-title"><span>报名</span></div> 
              <ul>
                  <li>
                    <div class="item-content">
                      <div class="item-inner">
                        <div class="item-title label">姓名：</div>
                        <div class="item-input">
                          <input type="text" name="name" value="" placeholder="请输入您的姓名">
                        </div>
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="item-content">
                      <div class="item-inner">
                        <div class="item-title label">性别：</div>
                        <div class="item-input no-border">
                          <div class="item"><input type="radio" name="gender" value="MALE" ${bmiQuestion.gender=='MALE' ? 'checked' : ''}><label>男</label></div>
                          <div class="item"><input type="radio" name="gender" value="FEMALE" ${bmiQuestion.gender=='FEMALE' ? 'checked' : ''}><label>女</label></div>
                        </div>
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="item-content">
                      <div class="item-inner">
                        <div class="item-title label">年龄：</div>
                        <div class="item-input">
                          <c:choose>
                            <c:when test="${not empty bmiQuestion}">
                              <p class="no-margin">${bmiQuestion.age}</p>
                            </c:when>
                            <c:otherwise>
                              <input type="number" name ="age" value="" placeholder="请输入您的年龄">
                            </c:otherwise>
                          </c:choose>
                          
                        </div>
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="item-content">
                      <div class="item-inner">
                        <div class="item-title label">身高：</div>
                        <div class="item-input">
                          <c:choose>
                            <c:when test="${not empty bmiQuestion}"> 
                              <p class="no-margin">${bmiQuestion.height}&nbsp;<span>cm</span></p>
                            </c:when>
                            <c:otherwise>
                              <input type="number" name ="height" value="" placeholder="请输入您的身高">
                            </c:otherwise>
                          </c:choose>
                        </div>
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="item-content">
                      <div class="item-inner">
                        <div class="item-title label">体重：</div>
                        <div class="item-input">
                          <c:choose>
                            <c:when test="${not empty bmiQuestion}">
                              <p class="no-margin">${bmiQuestion.weight}&nbsp;<span>kg</span></p>
                            </c:when>
                            <c:otherwise>
                              <input type="number" name ="weight" value="" placeholder="请输入您的体重">
                            </c:otherwise>
                          </c:choose>
                          
                        </div>
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="item-content">
                      <div class="item-inner">
                        <div class="item-title label">手机：</div>
                        <div class="item-input">
                          <input type="number" name ="mobile" value="" placeholder="以防教练加不到您">
                        </div>
                      </div>
                    </div>
                  </li>
                  <li>
                    <div class="item-content">
                      <div class="item-inner">
                        <div class="item-title label">微信：</div>
                        <div class="item-input">
                          <input type="text" name ="wechat" value="" placeholder="方便教练添加">
                        </div>
                      </div>
                    </div>
                  </li>
                </ul>
                <a href="javascrpt:void(0);" class="button pay-btn">立即支付报名</a>
            </div>
            <input type="hidden" name="source" value="${param.source}">
          </form>
        </div>
      </div>
    </div>
    <script>
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

      ga('create', 'UA-101357453-2', 'auto');
      ga('send', 'pageview');

    </script>
    <script>
      var _hmt = _hmt || [];
      (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?e697359d824bb9babbddea82b1c51ed2";
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
    <%@ include file="/WEB-INF/include/script.jsp"%>
    <d:resource type="script" root="${ctx.resource}/build" src="js/page/taste/sign-up.js" />
    <script type="text/javascript">
      require(['page/taste/sign-up'], function(page) {
        page.init({
          bmiQuestionId: "${bmiQuestion.id}",
          microMessenger: "${microMessenger}",
          orderId: "${orderId}"
        })
      })
    </script>
  </body>
</html>